package vn.hut.soict.cs.phanquanghuy.neslegend.emulator.memory;

public interface IMemory {
	/**
	 * Read data from memory
	 * @param physicAddress Physic address of memory cell want to read
	 * @return Data in memory cell
	 */
	public int readMemory(int physicAddress);
	
	/**
	 * Write to memory
	 * @param physicAddress
	 * @param value
	 */
	public void writeMemory(int physicAddress, int value);
	
	/**
	 * Clear all memory
	 */
	public void clear();
	
	/**
	 * Start address of memory
	 * @return 
	 */
	public int offset();
	
	/**
	 * Size of memory 
	 * @return
	 */
	public int length();
}
